Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 5 - Bitmap Shapes / About Bitmap Shapes


Bitmap Transforms

Although bitmap shapes make limited use of their style and ink objects, they make full use of their transform objects. Using the transform object, you can clip bitmap shapes and apply mapping transformations to them. Some examples are shown in Figure 5-5.

Figure 5-5 The effect of mappings on bitmap shapes

You can find examples of how to clip and map bitmap shapes in "Applying Transformations to Bitmaps," which begins on page 5-38, and you can find more information about clipping and mapping in the chapter "Transform Objects" in Inside Macintosh: QuickDraw GX Objects as well as the chapter "Mathematical Functions" in Inside Macintosh: QuickDraw GX Environment and Utilities.

Bitmap shapes, like other types of shapes, use the gxMapTransformShape shape attribute to determine how mappings should be applied to the shape. If you set this shape attribute, applying a mapping to a bitmap shape changes the mapping matrix stored in the transform object of the bitmap shape. However, if you do not set this shape attribute, applying a mapping to a bitmap shape changes the geometry of the bitmap directly--that is, QuickDraw GX creates a completely new pixel image to represent the transformed bitmap.

Figure 5-6 compares the results of rotating a bitmap shape with and without the gxMapTransformShape shape attribute set.

Figure 5-6 The effect of the gxMapTransformShape shape attribute on bitmap mappings

Each mapping that you apply to a bitmap shape that does not have its gxMapTransformShape shape attribute set results in quality degradation of the bitmap's pixel image. If you apply multiple mappings to a bitmap shape that does not have this shape attribute set, error can arise rapidly. The section "Applying Transformations to Bitmaps," which begins on page 5-38, gives an example of this phenomenon.

You can find information about the GXRotateShape function in the chapter "Transform Objects" in Inside Macintosh: QuickDraw GX Objects.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996